package com.example.dem6;

/**
 * @program: xian-cheng
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-01 19:45
 **/
public class TestPig {
    public static void main(String[] args) {
        PigDem pigDem=new PigDem();
        pigDem.start();
    }
}
class PigDem extends Thread{
    @Override
    public void run(){
        for (int i = 0; i < 20; i++) {
            try{
                Thread.sleep(1000);
            }catch (InterruptedException e){
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName()+"*********"+i);
        }
    }
}

